from ronglian_sms_sdk import SmsSDK


# accId = '容联云通讯分配的主账号ID'
accId = '8a216da87955ba19017959c6cc9e01ca'
# accToken = '容联云通讯分配的主账号TOKEN'
accToken = 'ad6eaddb639e4169a0ec568268e9ba7f'
# appId = '容联云通讯分配的应用ID'
appId = '8a216da87955ba19017959c6cdac01d1' 
  
def send_message(mobile, sms_code, time, tid):
    sdk = SmsSDK(accId, accToken, appId)
    # tid = '容联云通讯创建的模板ID'
    tid = tid
    # mobile = '手机号1,手机号2'
    mobile = mobile
    datas = (sms_code, time)
    # resp 中保存着响应参数
    resp = sdk.sendMessage(tid, mobile, datas)
    return resp
